Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Laravel 6.0 Shift #2

Merged
merged 14 commits into from
Sep 5, 2019
Merged

Laravel 6.0 Shift #2

merged 14 commits into from
Sep 5, 2019

Conversation

nasrulhazim
Copy link
Owner

This pull request includes the changes for upgrading to Laravel 6.0. Feel free to commit any additional changes to the shift-17767 branch.

Before merging, you should:

  • Checkout the shift-17767 branch
  • Review all pull request comments for additional changes
  • Update your dependencies for Laravel 6.0
  • Run composer update (if the scripts fail, add --no-scripts)
  • Thoroughly test your application (no tests?)

If you want help with your upgrade, check out the Shift Human Services or join the Shifty Coders Slack room to get answers to all your Laravel questions.

The Laravel framework adopts the PSR-2 coding style with some additions.
Laravel apps *should* adopt this coding style as well.

However, Shift allows you to customize the adopted coding style through
the [.shiftrc][1] file by using your [PHP CS Fixer][2] config.

[1]: https://laravelshift.com/shiftrc-configuration-file
[2]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
Laravel 5 adopted the short array syntax which became available in
PHP 5.4.
Laravel 5.1 requires PHP 5.5.9+ which provides the new static `class`
property to get the fully qualified name of a class and is preferred
over using class name strings.
Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are [deprecated in Laravel 5.8][1] and will be removed in a future version.

[1]: laravel/framework#26898
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them so you can review the commit diff for
changes. Moving forward, you should use ENV variables or create a
separate config file to allow the core config files to remain
automatically upgradeable.
@nasrulhazim
Copy link
Owner Author

nasrulhazim commented Sep 4, 2019

⚠️ Shift defaulted the following configuration files. This was done in the Default config files commit so you may easily review and backfill any of your customizations.

  • config/broadcasting.php
  • config/cache.php
  • config/database.php
  • config/filesystems.php
  • config/mail.php
  • config/queue.php
  • config/services.php

@nasrulhazim
Copy link
Owner Author

❌ Shift detected your application has a development dependency for the laravel/dusk package. The recommended version for Laravel 6.0 is ^5.5. You should review your dependency and ensure it meets the new version requirement, as well as review their README for additional changes.

@nasrulhazim
Copy link
Owner Author

nasrulhazim commented Sep 4, 2019

⚠️ Laravel 6.0 changed several of the core contracts with new implementations and methods. You should review the Upgrade Guide for more detail on these respective changes:

Shift found references to these contracts within:

  • app/Models/User.php

@nasrulhazim
Copy link
Owner Author

ℹ️ Laravel 6.0 made performance optimizations for integer key types. If you are using a string as your model's primary key, you may set the $keyType property on your model.

/**
 * The "type" of the primary key ID.
 *
 * @var string
 */
protected $keyType = 'string';

@nasrulhazim
Copy link
Owner Author

ℹ️ The mandrill and sparkpost mail drivers, as well as the rackspace storage driver were removed in Laravel 6.0. If you were using these drivers, you may adopt a community maintained package which provides the driver.

@nasrulhazim
Copy link
Owner Author

ℹ️ Previous versions of Laravel would retry jobs indefinitely. Beginning with Laravel 6.0, the php artisan queue:work now tries a job one time by default. If you want to force jobs to be tried indefinitely, you may pass the --tries=0 option.

@nasrulhazim
Copy link
Owner Author

⚗️ This Shift is still being refined. Please report any issues or suggestions. Your feedback is what helps improve the experience for everyone.

@nasrulhazim
Copy link
Owner Author

🎉 Congratulations, you're now running the latest version of Laravel.

The following Shifts can ensure your app is fully upgraded and following the practices recommended by Laravel and the community:

  • Laravel Linter analyzes your codebase for potential opportunities to do things "The Laravel Way".
  • Laravel Fixer automates many of the suggestions found by the Linter and other Shifts.
  • Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.

In addition, stay upgraded forever as well as run these Shifts by subscribing to one of the new Shifty Plans.

@nasrulhazim nasrulhazim merged commit dc8e42f into develop Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants